<template>

  <div class="centextBar" id="banner_edit" v-cloak style="height:100%">
    <div class="title">
      <div class="title">新增项目</div>
      <div class="buttonBar float-right">
      </div>
      <div class="clear"></div>
    </div>

    <div class="tableBox">
      <input type="hidden">
      <table class="detail-table" style="border-collapse: separate;">
        <tbody>
        <tr>
          <td class="v-label"> 项目名称:</td>
          <td class="text-grey" style="text-align:left;">
            <input id="pna" class="searchTxt" maxlength="20"
                   onkeyup="this.value=this.value.replace(/^ +| +$/g,'')"/></td>
          <td style="vertical-align:middle;">
            <div style="float: left;margin-left: -30%;">
              <span id="errPna" class="errTip"></span>
            </div>
          </td>
          <td></td>
        </tr>
        <tr>
          <td class="v-label">项目编号:</td>
          <td class="text-grey" style="text-align:left;">
            <input id="pnu" class="searchTxt" maxlength="20" onkeyup="this.value=this.value.replace(/^ +| +$/g,'')"/>

          </td>
          <td style="vertical-align:middle;">
            <div style="float: left;margin-left: -30%;">
              <span id="errPnu" class="errTip"></span>
            </div>
          </td>
          <td></td>

        </tr>
        <tr>
          <td class="v-label">所属公司:</td>
          <td class="text-grey" style="text-align:left">
            <input id="co" class="searchTxt" maxlength="20" onkeyup="this.value=this.value.replace(/^ +| +$/g,'')"/>
          </td>
          <td style="vertical-align:middle;">
            <div style="float: left;;margin-left: -30%;">
              <span id="errCo" class="errTip"></span>
            </div>
          </td>
          <td></td>
        </tr>
        <tr>
          <td class="v-label">负责人:</td>
          <td class="text-grey" style="text-align:left;">
            <select id="principal" class="form-control" maxlength="20"
                    style='width:301px;display: inline-block;margin-right: 10px;'>
              <!-- <option value="{{t.id}}" v-for="t in profiles.typeList">{{t.name}}</option> -->
              <option selected="selected" >{{nowPic}}</option>
              <option  v-for="user in userList">{{user.displayName}}</option>
            </select>

          </td>
          <td style="vertical-align:middle;">
            <div style="float: left;margin-left: -30%;">
              <span id="errPic" class="errTip"></span>
            </div>
          </td>
          <td></td>

        </tr>
        <tr>
          <td class="v-label">项目状态:</td>
          <td class="text-grey" style="text-align:left;height:66px;">
            <select id="status" class="form-control" style="text-align: center;width: 301px;">
              <!-- 	<option value="default">全部</option>-->
              <option value="UNAPPROVED">已暂停</option>
              <option value="APPROVED" selected="selected">已发布</option>
              <option value="DEFRIEND">待发布</option>
            </select>

          </td>
          <td style="vertical-align:middle;">
            <div style="float: left;margin-left: -30%;">
              <span id="errSts" class="errTip"></span>
            </div>
          </td>
          <td></td>
        </tr>
        </tbody>
      </table>
      <div class="loading">正在加载...</div>

      <!--  保存和取消按钮 -->
      <div style="margin-top: 2%">
        <button type="button"
                style="background: #58c394; color: #fff;width: 100px;border-color:#58c394;font-size: 15px;"
                class="btn btn-info">保存
        </button>

        <button @click="cancelProject"
                style="width: 100px;background: none;color:#58c394;border-color: #58c394"
                class="btn btn-deful">取消
        </button>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: "project_add",
    data() {
      return {
        userList: [],
        nowPic:'',
      }
    },
    methods: {
      cancelProject() {
        console.log(this)
        var self = this
        self.$router.push({
          path: '/project'
        })
      }
    }
  }
</script>


<style scoped>
  table th {
    text-align: left;
  }

  .tableBox tr:nth-child(odd) td {
    background: none;
  }

  .detail-table tr .label-td {
    width: 10%;
    text-align: left;
    color: #666666;
    line-height: 50px !important;
    font-size: 16px;
  }

  .tableBox td {
    margin-left: 12px;
    border: 0px !important;
    text-align: left;
  }

  .searchTxt {
    width: 300px;
    /*   height: 35px;
      line-height: 35px; */
    box-sizing: border-box;
    border-radius: 5px;
    background: transparent;
    border: 1px solid #CCCCCC;
    outline: none;
    font-size: 16px;
  }

  .detail-table tr td {
    height: 0px !important;
    padding: 8px;
    border-bottom: 1px dashed #e8e8e8;
  }

  .detail-table tr .label-td {
    width: 8%;
    /*     text-align: left; */
    color: #666666;
    line-height: 50px !important;
    font-size: 16px;
  }

  .detail-table tr .content {
    padding-left: 0px !important;
    line-height: 50px !important;
    color: #222222;
    font-size: 17px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .detail-table {
    width: 100%;
    margin: 0 auto;
    border-collapse: collapse;
    border: none;
    font-size: 1rem;
    margin-bottom: 0px;
    border-bottom: 1px solid #ccc;

  }
</style>
